Skip to main content
Version: 1.x.x

CommandDump


import { CommandDump } from "@hyper-fetch/core"

Description

Dump of the command used to later recreate it

Defined in command/command.types.ts:33

Preview

type CommandDump<Command,ClientOptions,QueryParamsType,Params> = {
abortKey: string;
auth: boolean;
cache: boolean;
cacheKey: string;
cacheTime: number;
cancelable: boolean;
commandOptions: CommandConfig<string, ClientOptions | ExtractClientOptions<Command>>;
data: CommandData<ExtractRequestData<Command>, unknown>;
deduplicate: boolean;
deduplicateTime: number;
disableRequestInterceptors: boolean | undefined;
disableResponseInterceptors: boolean | undefined;
effectKey: string;
endpoint: string;
garbageCollection: number;
headers: HeadersInit;
method: HttpMethodsType;
offline: boolean;
options: ClientOptions | ExtractClientOptions<Command>;
params: Params | NegativeTypes;
queryParams: QueryParamsType | NegativeTypes;
queueKey: string;
queued: boolean;
retry: number;
retryTime: number;
updatedAbortKey: boolean;
updatedCacheKey: boolean;
updatedEffectKey: boolean;
updatedQueueKey: boolean;
used: boolean;
}

Structure

{
abortKey: string;
auth: boolean;
cache: boolean;
cacheKey: string;
cacheTime: number;
cancelable: boolean;
commandOptions: {
abortKey: string;
auth: boolean;
cache: boolean;
cacheKey: string;
cacheTime: number;
cancelable: boolean;
deduplicate: boolean;
deduplicateTime: number;
disableRequestInterceptors: boolean;
disableResponseInterceptors: boolean;
effectKey: string;
endpoint: GenericEndpoint;
garbageCollection: number;
headers: HeadersInit;
method: GET | POST | PUT | PATCH | DELETE;
offline: boolean;
options: ClientOptions;
queueKey: string;
queued: boolean;
retry: number;
retryTime: number;
};
data: MappedData extends undefined ? RequestDataType : MappedData | \null\ | \undefined\;
deduplicate: boolean;
deduplicateTime: number;
disableRequestInterceptors: boolean | undefined;
disableResponseInterceptors: boolean | undefined;
effectKey: string;
endpoint: string;
garbageCollection: number;
headers: HeadersInit;
method: GET | POST | PUT | PATCH | DELETE;
offline: boolean;
options: ClientOptions | T extends Command<any, any, any, any, any, any, infer O, any, any, any> ? O : never;
params: Params | \null\ | \undefined\;
queryParams: QueryParamsType | \null\ | \undefined\;
queueKey: string;
queued: boolean;
retry: number;
retryTime: number;
updatedAbortKey: boolean;
updatedCacheKey: boolean;
updatedEffectKey: boolean;
updatedQueueKey: boolean;
used: boolean;
}